package com.lcw.lostandfound.mapper;

import com.lcw.lostandfound.pojo.Admin;
import com.lcw.lostandfound.pojo.Notice;
import org.apache.ibatis.annotations.*;
import org.springframework.stereotype.Repository;

import java.util.List;

@Mapper
@Repository
public interface NoticeMapper {
    List<Notice> findAllNotice();

    @Select({"select *from t_notice where id=#{id}"})
    Notice queryNotice(Integer id);
    @Delete({"delete from t_notice where id = #{id}"})
    int deleteNotice(Integer id);
    @Insert({"insert into t_notice(content) values (#{content})"})
    int insertNotice(Notice notice);
    @Update({"update t_notice set content=#{content} where id =#{id}"})
    int updateNotice(Notice notice);
}
